package com.easytopit.demo.lianxi.dao;

import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.easytopit.demo.lianxi.user.User;

public interface UserDao {
	
	/**
	 * 添加
	 * @param user
	 * @return
	 */
	public Integer insert(User user);
	
	/**
	 * 修改
	 * @param name
	 * @param passwd
	 * @param phone
	 * @param age
	 * @param sex
	 * @return
	 */
	public boolean amend(@Param("id")Integer id, @Param("name")String name, @Param("passwd")String passwd, @Param("phone")String phone, @Param("age")String age);
	
	/**
	 * 查询
	 * @param name
	 * @return
	 */
	public List<User> query(String name);
	
	/**
	 * 根据id删除
	 * @param id
	 * @return
	 */
	public boolean remove(Integer id);
	
	/**
	 * 数量
	 * @param name
	 * @return
	 */
	public int count(String name);
}
